<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>话题</title>

  {include file='common/_require'/}
</head>

<body>

  {include file='common/_header'/}
  <div class="layui-container">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md8">
        <div class="fly-panel" style="margin-bottom: 0;">
          <div class="fly-panel-title fly-filter">
            <a href="{:url('Topic/index',array_merge($Request.get,['type'=>0]))}" class="item-key-0">综合</a>
            {volist name='\app\model\Nav::getListIndexNav("topic_type")' id='topic_type'}
            <span class="fly-mid"></span>
            <a href="{:url('Topic/index',array_merge($Request.get,['type'=>$topic_type.key]))}" class="item-key-{$topic_type.key}">{$topic_type.title}</a>
            {/volist}
            <span class="fly-filter-right layui-hide-xs">
              <a href="{:url('Topic/index',array_merge($Request.get,['sort_by'=>'create_time']))}" class="item-sort-create_time">按最新</a>
              <span class="fly-mid"></span>
              <a href="{:url('Topic/index',array_merge($Request.get,['sort_by'=>'hits_count']))}" class="item-sort-hits_count">访问量</a>
              <span class="fly-mid"></span>
              <a href="{:url('Topic/index',array_merge($Request.get,['sort_by'=>'post_count']))}" class="item-sort-post_count">文章数</a>
            </span>

            <script>
              $('.item-key-{$Request.param.type|default="0"}').addClass('layui-this')
              $('.item-sort-{$Request.param.sort_by|default="create_time"}').addClass('layui-this')
            </script>
          </div>

          <ul class="tolic-list">
            {volist name='list' id='vo'}

            <li class="topic-item">
              {notempty name='$vo.title_img'}

              <div class="pic-box">
                <a target="_blank" href="{$vo.read_url}">
                  <img src="{$vo.title_img_src}" alt="#{$vo.title}#" class="pic">
                </a>

              </div>
              {/notempty}
              <div class="info-box">
                <div class="info-main">
                  <div class="title">
                    <a target="_blank" href="{$vo.read_url}">#{$vo.title}#</a>
                  </div>
                  <div class="subtitle">{:\\app\\common\\TextFormat::br($vo.desc)}</div>

                </div>
                <div class="info-plus">
                  <div class="info-plus-item">
                    <span class="info-title">
                      文章数:
                      <span>
                        <span class="number">{$vo.post_count} </span>
                      </span>
                    </span>
                  </div>
                  <div class="info-plus-item">
                    <span class="info-title">
                      阅读数:
                      <span>
                        <span class="number">{$vo.hits_count}</span>
                      </span>
                    </span>
                  </div>


                </div>
              </div>

            </li>
            {/volist}

          </ul>

          <div>
            {$list->render()|raw}
          </div>
        </div>

      </div>
      <div class="layui-col-md4">

        {notempty name='\app\model\Nav::getListIndexNav("topic_ad")'}
        <div class="fly-panel">
          <div class="fly-panel-title">
            赞助广告
          </div>
          <div class="fly-panel-main">
            {volist name='\app\model\Nav::getListIndexNav("topic_ad")' id='nav'}
            {empty name='$nav->getData("img")'}
            <a href="{$nav.value}" target="{$nav.target}" class="fly-zanzhu" style="background-color: #66CCFF ;">{$nav.title}</a>
            {else /}
            <a href="{$nav.value}" target="{$nav.target}" class="fly-zanzhu" style="background-image: url('{$nav.img}');background-size: cover;background-position: center;">{$nav.title}</a>
            {/empty}
            {/volist}
          </div>
        </div>
        {/notempty}

        <div class="fly-panel fly-link">
          <h3 class="fly-panel-title">友情链接</h3>
          <dl class="fly-panel-main">
            {volist name='\app\model\Nav::getListIndexNav("friend_link")' id='nav'}
            <dd>
              <a href="{$nav.value}" target="{$nav.target}">{$nav.title}</a>
            </dd>
            {/volist}

          </dl>
        </div>

      </div>
    </div>
  </div>
  {include file='common/_footer'/}
</body>

</html>